package com.tca.cloud.equipment.biz.controller;

import com.tca.cloud.equipment.api.req.EquipmentReq;
import com.tca.cloud.equipment.api.resp.EquipmentResp;
import com.tca.cloud.person.api.service.PersonFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/equipment")
@Slf4j
public class EquipmentController {

    @Autowired
    private PersonFeign personFeign;

    /**
     * 获取人员
     * @param equipmentReq
     * @return
     */
    @PostMapping("/get")
    public EquipmentResp get(@Validated @RequestBody EquipmentReq equipmentReq) {
        EquipmentResp equipmentResp = new EquipmentResp();
        equipmentResp.setId(equipmentReq.getId());
        equipmentResp.setName("平板设备");

        return equipmentResp;
    }
}
